package com.example.videoweb.service.impl;

import com.example.videoweb.dao.UnCheckVideoMapper;
import com.example.videoweb.domain.UnCheckVideo;
import com.example.videoweb.service.UnCheckVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnCheckVideoServiceImpl implements UnCheckVideoService {

    @Autowired
    private UnCheckVideoMapper unCheckVideoMapper;


    @Override
    public boolean insert(UnCheckVideo unCheckVideo) {
        return unCheckVideoMapper.insert(unCheckVideo) > 0;
    }

    @Override
    public boolean update(UnCheckVideo unCheckVideo) {
        return unCheckVideoMapper.update(unCheckVideo) > 0;
    }

    @Override
    public boolean delete(Integer id) {
        return unCheckVideoMapper.delete(id) > 0;
    }

    @Override
    public UnCheckVideo selectByPrimaryKey(Integer id) {
        return unCheckVideoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<UnCheckVideo> allVideo() {
        return unCheckVideoMapper.allVideo();
    }

    @Override
    public List<UnCheckVideo> getByAuthorId(Integer authorId) {
        return unCheckVideoMapper.getByAuthorId(authorId);
    }
}
